package com.zy.cat.entity.dev;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatDevBeansConvertInfoPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫用户现金豆兑换历史实体类
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_beans_convert_data", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "dstatus", columnList = "dstatus"),
		@Index(name = "ltime", columnList = "ltime"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@NoArgsConstructor
@AllArgsConstructor
@IdClass(CatDevBeansConvertInfoPrimary.class)
@ApiModel("9趣猫用户现金豆兑换历史实体类")
public class CatDevBeansConvertInfo {

	@Id
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56")
	private String ctime;
	
	@Id
	@Column(columnDefinition = "CHAR(32) NOT NULL COMMENT '用户账号ID'")
	@ApiModelProperty(value = "用户账号ID", example = "9a0975cda1e461e23fe53d6a4fa29641")
	private String pid;
	
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '兑换现金豆数量'")
	@ApiModelProperty(value = "兑换现金豆数量", example = "10000")
	private long beans;
	
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '兑换人民币金额(分)'")
	@ApiModelProperty(value = "兑换人民币金额(分)", example = "100")
	private long rmb;
	
	@Column(columnDefinition = "INT(2) DEFAULT '1' COMMENT '现金豆兑换状态，（-1：兑换失败 、0.审核中、1.兑换成功）'")
	@ApiModelProperty(value = "现金豆兑换状态，（-1：兑换失败 、0.审核中、1.兑换成功）", example = "1")
	private long dstatus;
 
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 12:56:56")
	private String ltime;
	
	@Column(columnDefinition = "VARCHAR(200) DEFAULT '-' COMMENT '备注'")
	@ApiModelProperty(value = "备注", example = "备注")
	private String info = "-";

	public CatDevBeansConvertInfo(String ctime, String pid, long beans, long rmb, long dstatus, String ltime) {
		super();
		this.ctime = ctime;
		this.pid = pid;
		this.beans = beans;
		this.rmb = rmb;
		this.dstatus = dstatus;
		this.ltime = ltime;
	}
	
	
}
